var express = require('express');
var router = express.Router();
var Mock = require('mockjs');

/* GET home page. */
router.get('/', function(req, res, next) {
    let userData=Mock.mock({
            "name01|12":[{
                "number|60-1000": 1,
            }],
            "name02|12":[{
                "number|500-1500":1,
            }],
            "t|9":[{
                "number|2000-10000":1,
            }],
            "lz|3":[{
                "number|100-300":1,
            }]
    });
    let data={};
    let name01=[];
    let name02=[];
    let lz=[];
    let t=[];
    for (let i=0;i<12;i++){
        name01[i]=userData.name01[i].number;
        name02[i]=userData.name02[i].number;
    }
    for (let i=0;i<9;i++){
        t[i]=userData.t[i].number;
    }
    for (let i=0;i<3;i++){
        lz[i]=userData.lz[i].number;
    }
    data["name01"]=name01;
    data["name02"]=name02;
    data["t"]=t;
    data["lz"]=lz;

    res.json(data);
});

module.exports = router;
